package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.AssetsStepsProcess;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/AssetsStepsProcessMapper.class */
public interface AssetsStepsProcessMapper {
    @Select({"select a.*,u.name  from assets_steps_process  a LEFT JOIN `user` u ON a.`userId` = u.`id` where  assets_steps_id = #{assetsStepsId} and type = #{type}"})
    @Results(id = "AssetsStepsProcessMap", value = {@Result(column = "assets_steps_id", property = "assetsStepsId", jdbcType = JdbcType.INTEGER, id = true), @Result(column = "do_time", property = "doTime", jdbcType = JdbcType.VARCHAR)})
    List<AssetsStepsProcess> queryByAssetsId(@Param("assetsStepsId") Integer num, @Param("type") String str);

    @Insert({"insert into assets_steps_process (assets_steps_id,do_time,status,userId,opinion,type) " +
            "values(#{assetsStepsId},#{doTime},#{status},#{userId},#{opinion},#{type})"})
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int add(AssetsStepsProcess assetsStepsProcess);
}